<%@ page pageEncoding="utf-8"%>
<%@ include file="/header.jsp"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://jsptags.com/tags/navigation/pager" prefix="pg" %>
<style>
*{font-family:"微软雅黑";font-size:14px}
</style>
<a href="${ctx }/addMessage.jsp">添加新的留言内容</a>
留言内容:<br><br>
<c:set var="results" value="${requestScope['guestbook.pager'].list}"></c:set>
<c:forEach items="${results}" var="gb">
<div align="center">
  <table width="236" height="193" border="1" bgcolor="#CCCCCC">
    <tr>
      <td width="84">编号：</td>
      <td width="142"><c:out value="${gb.id}"/></td>
    </tr>
    <tr>
      <td>姓名：</td>
      <td><c:out value="${gb.name}"/></td>
    </tr>
    <tr>
      <td>电话：</td>
      <td><c:out value="${gb.phone}" default="未填"/></td>
    </tr>
    <tr>
      <td>Email：</td>
      <td><c:out value="${gb.email}" default="未填"/></td>
    </tr>
    <tr>
      <td>主题：</td>
      <td><c:out value="${gb.title}"/></td>
    </tr>
    <tr>
      <td>内容：</td>
      <td><c:out value="${gb.content}" default="未填" /></td>
    </tr>
    <tr>
      <td>时间：</td>
      <td><c:out value="${gb.time}"/></td>
    </tr>
  </table>
  <br><br>
</div>
</c:forEach>
<center>
<pg:pager url="${ctx}/getMessage" items="${requestScope['guestbook.pager'].maxElements}" maxPageItems="${initParam.pageSize}" maxIndexPages="3">
	<pg:index>
		<pg:first unless="current">
			<a href="${pageUrl}&p=${pageNumber}">首页</a>
		</pg:first>
		<pg:prev>
			<a href="${pageUrl}&p=${pageNumber}">上一页{${pageNumber}}</a>
		</pg:prev>>
		<pg:pages>
			<a href="${pageUrl}&p=${pageNumber}">${pageNumber}</a>
		</pg:pages>
		<pg:next>
			<a href="${pageUrl}&p=${pageNumber}">下一页{${pageNumber}}</a>
		</pg:next>
		<pg:last unless="current">
			<a href="${pageUrl}&p=${pageNumber}">末页</a>
		</pg:last>
	</pg:index>
</pg:pager>
</center>
<%@ include file="/footer.htm"%>
